<%@page contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="s"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="sf"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
<style type="text/css">
<%@include file="../stylesheets/progresbar.css"%>
 <%@ include file="../stylesheets/main.css"%> 
<%@ include file="../stylesheets/header.css"%>
<%@ include file="../stylesheets/footer.css"%>
 <%@ include file="../stylesheets/indexContent.css"%>
<%@ include file="../stylesheets/carousel.css"%> 
</style>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Szczegóły produktu</title>
</head>

<body>
	<div id="left-column-outer">
		<div id="left-column"></div>
	</div>
	<div id="center-column">
		<div class="CenteredContainer">
			<img id="background_noresize" alt="background_noresize"
				src="<%=request.getContextPath()%>/img/background.jpg" />
			<%@ include file="header.jsp"%>
			<div class="ContentShade-left">
				<%-- 				<table>
 
<form name="editProduct" action="products" method="post" >
	<tr><th align="left">Id</th> <td>${p.productId }</td></tr>
	<tr><th align="left">Nazwa</th> <td><input type="text" value="${p.name }" name="operation"> </td></tr>
	<tr><th align="left">Producent</th> <td><input type="text" value="${p.manufacturer }" name="operation"> </td></tr>
	<tr><th align="left">Typ</th> <td><input type="text" value="${p.type }" name="operation"> </td></tr>
	<tr><th align="left">Opakowanie</th> <td><input type="text" value="${p.bundle }" name="operation"> </td></tr>
	<tr><th align="left">Zawartość alk.</th> <td><input type="text" value="${p.voltage }" name="operation"> </td></tr>
	<tr><th align="left">Cena</th> <td><input type="text" value="${p.price }" name="operation"> </td></tr>
	<tr><th align="left">Pojemność</th> <td><input type="text" value="${p.capacity }" name="operation"> </td></tr>
	<tr><th align="left">Opis</th> <td><input type="text" value="${p.description }" name="operation"> </td></tr>
	</form> 
</table> --%>
<div align="center" style=" color:red"><b>${ms}</b></div>
				<table>

					<sf:form method="POST" action="editproduct" commandName="product">
											<tr>
							
							<td><sf:hidden path="id" itemLabel="id"/></td>
							<td><sf:hidden path="productId" itemLabel="productId"/></td>
						</tr>

						<tr>
							<td><sf:label path="name">Nazwa</sf:label></td>
							<td><sf:input path="name" itemLabel="name"/></td>
							<td><sf:errors path="name" style="color: red; float: right;"/></td>
						</tr>
						<tr>
							<td><sf:label path="manufacturer">Producent</sf:label></td>

							<td><sf:select path="manufacturer">
								<sf:option value="BOSMAN" label="Bosman" />
								<sf:option value="CARLSBERG" label="Carlsberg" />
								<sf:option value="DEBOWE" label=" Debowe" />
								<sf:option value="GINGERS" label="Gingers" />
								<sf:option value="HARNAS" label="Harnas" />
								<sf:option value="HEINEKEN" label="Heineken" />
								<sf:option value="KASZTELAN" label="Kasztelan" />
								<sf:option value="KORMORAN" label="Kormoran" />
								<sf:option value="KSIAZECE" label="Ksiazece" />
								<sf:option value="LECH" label="Lech" />
								<sf:option value="LOMZA" label="Łomza" />
								<sf:option value="PERLA" label="Perla" />
								<sf:option value="TATRA" label="Tatra" />
								<sf:option value="TYSKIE" label="Tyskie" />
								<sf:option value="WARKA" label="Warka" />
								<sf:option value="WOJAK" label="Wojak" />
								<sf:option value="ZUBR" label="Żubr" />
								<sf:option value="ZYWIEC" label="Żywiec" />
								</sf:select></td>
						</tr>
						<tr>
							<td><sf:label path="capacity">Pojemność</sf:label></td>
							<td><sf:input path="capacity" itemLabel="capacity"/></td>
							<td><sf:errors path="capacity" style="color: red; float: right;"/></td>
						</tr>

						<tr>
							<td><sf:label path="price">cena</sf:label></td>
							<td><sf:input path="price" /></td>
							<td><sf:errors path="price" style="color: red; float: right;"/></td>
						</tr>
						<tr>
							<td><sf:label path="type">Typ</sf:label></td>
							<td><sf:input path="type" /></td>
							<td><sf:errors path="type" style="color: red; float: right;"/></td>
						</tr>
						<tr>
							<td><sf:label path="voltage">Zawartość alkoholu</sf:label></td>
							<td><sf:input path="voltage" /></td>
							<td><sf:errors path="voltage" style="color: red; float: right;"/></td>
						</tr>
						<tr>
							<td><sf:label path="bundle">Opakowanie</sf:label></td>

							<td><sf:select path="bundle">
									<sf:option value="BOTTLE" label="Butelka" />
									<sf:option value="CAN" label="Puszka" />
									<sf:option value="PLASTIC" label="Butelka plastikowa" />
									<sf:option value="KEG" label="Keg" />
									<sf:option value="BARREL" label="Beczka" />
								</sf:select></td>
						</tr>

	 					<tr>
							<td><sf:label path="ingredients">Składniki</sf:label></td>
							<td><sf:checkboxes items="${ingredientList}"
									path="ingredients" itemLabel="name" itemValue="id" /></td>

						</tr> 
						<td></td>
						<td align="right" colspan="3"><input type="submit"
							value="Edytuj" /></td>
						</tr>
					</sf:form>

				</table>




			</div>
			<div class="ContentShade-right"></div>
			<c:forEach items="${be.productionThreadsList}" var="pt"
				varStatus="loop">

			</c:forEach>


			<%@ include file="footer.jsp"%>
		</div>
	</div>
	<div id="right-column-outer">
		<div id="right-column"></div>
	</div>

</body>